package com.test.demos.dao;

import com.test.demos.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDAO {
	//新增
	int saveUser(User user);
	int saveUserOracle(User user);
	//批量添加

	int  saveUserAll (@Param("list") List<User> list);
	//删除by编号
	int deleteUserByBh(@Param("id") Integer id);
	//根据uid删除
	int deleteUserByUID(@Param("uid") String uid);
	//删除by条件
	int deleteUserByCondition(@Param("user") User user);
	//修改
	int updateUser(User user);
	//查询
	List<User> getUserPageByCondition(
		@Param("user") User user,
		@Param("start") int start,
		@Param("range") int range);

	List<User> getUserPageByConditionOrder(
		@Param("user") User user,
		@Param("start") int start,
		@Param("range") int range,
		@Param("orderStr") String orderStr);

	int countUserByCondition(@Param("user") User user);
	List<User> getUserByCondition(@Param("user") User user);
	User getOneUser(@Param("bh") Integer bh);
	User getOneUserByUID(@Param("uid") String uid);

}
